package com.zan.t1;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author Zan
 * @Create 2024/3/6 11:30
 * @Description :
 */
public class Demo1_5 {
    public static void main(String[] args) {
        int i = 0;
        try {
            List<String> list = new ArrayList<>();
            String a = "hello";
            while (true) {
                list.add(a); // hello, hellohello, hellohellohello, hellohellohellohello ......
                a = a + a;
                i++;
            }
        } catch (Throwable e) {
            e.printStackTrace();
            System.out.println(i);
        }

    }
}
